home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
dskut
/
passw11.zip
/
SETPASSW.PAS
< prev
Wrap
Pascal/Delphi Source File
|
1992-11-02
|
1KB
|
69 lines
{
Patchprogramm um das Passwort in PASSWORD.SYS neu einzustellen
Autor: Christoph Christ
Datum: 1.11.1992
Version: 1.0A für NECV20, NecV30, 80286 und höhere
MAPFILE von PASSWORD.SYS:
Start Stop Length Name Class
00000H 001F3H 001F4H CODE
Address Publics by Name
0000:003C PASSWORD
Address Publics by Value
0000:003C PASSWORD
Program entry point at 0000:0000
Warning: No stack
}
program SetPassword;
uses crt;
var s:String;
pw: String;
i:byte;
f: File;
l: Byte;
c: Char;
begin
Writeln('Password Protection (c) Christoph Christ 1.11.1992');
Write(^J^M'Input the active password: ');
Readln(s);
assign(f, 'password.sys');
reset(f, 1);
Seek(f, $3C);
Blockread(F, PW, 40);
for I := 1 to length(PW) do byte(PW[i]) := Byte(PW[I]) XOR I;
if S <> PW then
begin
Writeln('Password incorrect - program aborted');
end
else
begin
Write('Password correct. '^M^J'Input the new password: ');
Readln(S);
Write('Password really OK (Yes, No)? ');
Repeat C := Upcase(Readkey); until C in ['Y','N','J'];
Writeln(C);
if (C='N') or (C='n') then Exit;
for I := 1 to length(S) do byte(S[i]) := Byte(S[I]) XOR I;
Seek(F, $3C);
BlockWrite(f, S[0], 1);
Seek(F, $3D);
BlockWrite(f, S[1], Length(S));
Writeln;
Writeln('New Password saved.');
end;
close(f);
end.